/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sfms.util;

import java.text.SimpleDateFormat;

/**
 *
 * @author hy753
 */
public class CustomDate extends java.util.Date{
    
        public CustomDate(){
            super();
        }
    
        public CustomDate(java.util.Date d){
            super(d.getTime());
        }
        
        public CustomDate(java.sql.Date d){
            super(d.getTime());
        }
    
    
        public String toString(){
            SimpleDateFormat formatter = new SimpleDateFormat("EE MMMM d, yyyy");
            return formatter.format(this);
        }
        
        public java.sql.Date getSQLDate(){
            return new java.sql.Date(this.getTime());
        }
        
        public String showTime(){
            SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
            return formatter.format(this);
        }
}
